<% @title = @rubygem.name %>
<% @subtitle = t(".info", gem: @rubygem.name) %>
<% @roles = Ownership.roles.map { |k,_| [Ownership.human_attribute_name("role.#{k}"), k] } %>

<div class="t-body">
  <%= render "owners_table" %>
</div>

<div class="l-overflow">
  <div class="t-body">
    <h2><%= t(".add_owner") %></h2>
  </div>
  <%= form_tag rubygem_owners_path, method: :post, class: "new_ownership", id: "new_ownership" do %>
    <div class="text_field">
      <%= label_tag :handle, t(".email_field"), class: "form__label" %>
      <%= text_field_tag :handle, nil, class: "form__input", required: true %>
    </div>
    <div class="text_field">
      <%= label_tag :role, t(".role_field"), class: "form__label" %>
      <br>
      <%= select_tag :role, options_for_select(@roles), class: "form__input form__select" %>
    </div>
    <div class="submit_field">
      <%= submit_tag t(".submit_button"), data: {disable_with: t("form_disable_with")}, class: "form__submit" %>
    </div>
  <% end %>
</div>
